import axios from 'axios'
import './request.js'

// 查询个人地址
export const getAddress = function () {
  return axios.get('/content/address/list')
}

// json 格式的数据
const headers = { 'content-Type': 'application/json' }
// 新增个人地址
export const addAddress = function (params) {
  return axios.post('/content/address/add', JSON.stringify(params), { headers: headers })
}

// 删除个人地址
export const deleteAddress = function (params) {
  return axios.delete(`/content/address/delete/${params}`)
}

// 编辑个人地址
export const EditAddress = function (params) {
  return axios.put('/content/address/update', JSON.stringify(params), { headers: headers })
}
